<template>
  <nav class="navbar-default navbar-static-side">
    <!--真无意义-->
    <div class="sidebar-collapse">
      <ul class="nav" id="side-menu">
        <!--用户信息-->
        <userinfo></userinfo>
        <leftmenuli v-for="li in lis" :key="li.id" :li="li"></leftmenuli>
        <li>
          <a href="#">
            <i class="fa fa-home"></i>
            <span class="nav-label">主页</span>
            <span class="fa arrow"></span>
          </a>
          <ul class="nav nav-second-level">
            <li>
              <a class="J_menuItem" href="index_v1.html" data-index="0">主页示例一</a>
            </li>
            <li>
              <a class="J_menuItem" href="index_v2.html">主页示例二</a>
            </li>
            <li>
              <a class="J_menuItem" href="index_v3.html">主页示例三</a>
            </li>
            <li>
              <a class="J_menuItem" href="index_v4.html">主页示例四</a>
            </li>
            <li>
              <a href="index_v5.html" target="_blank">主页示例五</a>
            </li>
          </ul>
        </li>
        <li>
          <a href="#">
            <i class="fa fa-home"></i>
            <span class="nav-label">人员信息</span>
            <span class="fa arrow"></span>
          </a>
          <ul class="nav nav-second-level">
            <li>
              <a class="J_menuItem" href="index_v1.html" data-index="0">姓名信息</a>
            </li>
            <li>
              <a class="J_menuItem" href="index_v1.html" data-index="0">性别信息</a>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>
</template>
<script>
  import userinfo from './components/UserInfo'
  import leftmenuli from './components/ExpandLi.vue'
  import bus from '@/assets/eventBus'
  export default {
    data () {
      return {
        lis: [
          {
            "id":1,
            "lv1_label": "首页1",
            "lv2lis": [{
              "lv2_label":"示例1",
              "href":"#"
            },{
              "lv2_label":"示例2",
              "href":"#"
            }]
          },
          {
            "id":2,
            "lv1_label": "首页2",
            "lv2lis": [{
              "lv2_label":"示例1",
              "href":"#"
            },{
              "lv2_label":"示例2",
              "href":"#"
            }]
          }
        ],
      }
    },
    mounted () {
      const self = this;
      bus.$on("miniLS",function(){
        $("body").toggleClass("mini-navbar");
      });
    },
    methods : {

    },
    components : {
      userinfo,
      leftmenuli
    }
  }
</script>
<style>

</style>
